<include file="Public:header" />
<load href="__JS__/upload/uploadify.css" />
<load href="__JS__/swfobject.js" />
<script type="text/javascript" src="__JS__/jquery.uploadify.v2.1.4.min.js"></script> 
<div class="content">
<!-----------------------------------------内容开始--------------------------------------------------->
<div class="infoBox">
<script>
</script>

<form name="form" action="{:U('doart_photo')}" method="post" onsubmit="return checkform();">
<input type="hidden" name="fid" value="{$fid}" />
<input type="hidden" name="id" value="{$id}" />

<style>
.infoBoxTd{width:80px;min-width:80px;}
.checkboxml{margin-left:10px;}
.fred{color:#CC0000;}
.border_right{border-right:1px solid #eee;}
</style>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
	<tr>
<!--		<td class="infoBoxTd border_right" rowspan="4" >相片集<span class="xpj_num">i</span>：</td>
-->		<td class="infoBoxTd">名称：</td>
		<td>
			<INPUT name="name" value="{$name}" class="formTitle xzzsinput" size="80" maxlength="20" onkeyup="word_count(20,this)"  >
			您已输入<span class="fred ysrzs">0</span>字，还可输入<span class="fred syzs">20</span>字。
		</td>
	</tr>
	<tr>
		<td class="infoBoxTd">缩略图：</td>
		<td>
			<img id="url" src="<neq name='url' value=''>{$url}<else/>__PUBLIC__/images/nopic.gif</neq>" width="280" height="170" style="float:left;margin-right:20px;" />
			<div class="upimg-box"><div id="fileQueue"></div>
			<input id="file_upload_url" type="file" /><input name="url" type="hidden" value="{$url}" /></div>
		</td>
	</tr>

</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="infoBoxTd">&nbsp;</td>
<td align="left"><input type="submit" name="Button1" value="保存" class="formInput01" /></td>
</tr>
</table>
</form>
</div>
<!-----------------------------------------内容结束--------------------------------------------------->
</div>
    

<include file="Public:footer" />
<script type="text/javascript">
//字数限制js

function word_count(t,obj){
	var wordleng=$(obj).val().length;
	var syzs=t-wordleng;
	$(obj).parent().find('span.ysrzs').text(wordleng);
	$(obj).parent().find('span.syzs').text(syzs);
}
$(document).ready(function(){
	$("input.xzzsinput").each(function(){
		var wordleng=$(this).val().length;
		var syzs=$(this).parent().find('span.syzs').text()-wordleng;
		$(this).parent().find('span.ysrzs').text(wordleng);
		$(this).parent().find('span.syzs').text(syzs);
	});
});

//图片上传
$("#file_upload_url").uploadify({
		'uploader'       : '__JS__/swf/uploadify.swf',
		'script'         : '__JS__/upload/uploadify.php',
		'cancelImg'      : '__JS__/upload/cancel.png',
		'folder'         : 'data/photo_url',
		'queueID'        : 'fileQueue',
		'sizeLimit'      :	2 * 1000 * 1024,
		'fileExt'        : '*.jpg;*.gif;*.png;', //允许文件上传类型,和fileDesc一起使用.
		'fileDesc'       : '*.jpg;*.gif;*.png;',  //选择文件对话框中的提示文本.
		'auto'           : true,
		'multi'          : false,	
		'onComplete':function(event,queueId,fileObj,response,data){
			$('input[name="url"]').val(response);
			$('#url').attr('src', response);
		}
});


</script>
